﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MenuSystemSite.master" %>
    
  <%--  Inherits="System.Web.Mvc.ViewPage<MenuSystem.Models.tabViewModel>" --%>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <!---Header Needed?
    <h2>
        Spectrum Health Menu System</h2>
    --->
         <ul>
          <% foreach (MenuSystem.Models.Building m in (IEnumerable)ViewData.Model)

          { %>
               <li> <%= m.Building_Name %> </li>
          <% } %>
     </ul>

    <head>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#tabContainer").tabs();
            });    
        </script>
        <script type="text/javascript">
            function updateLabel(option) {
                
                document.getElementById("name").innerHTML = option;
            }
</script>
        <link rel="stylesheet" href="../../Css/CssReferenceFileFromNewsCenter.css" />
    </head>
    <!---To Do: Create tabs dynamically--->
    <div id="tabContainer">
        <ul>
            <li><a href="#tabs-1"><span id=name>All</span></a></li>
            <!--li><a href="#tabs-2">Tab #2</a></li-->
        </ul>
        <div id="tabs-1">
            <% Html.RenderPartial("_tab1", Model);  %>
        </div>
        <!--div id="tabs-2"-->
        <!--% Html.RenderPartial("_tab2", Model);  %-->
        <!--/div-->
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TemplateLeftNav" runat="server">
    <script>
        $(function () {
            $("#datepicker").datepicker();
        });
    </script>
 
    <form action="">
      <div class="filters">
        <div class="field">
          <label>Select A Location:</label>
         <%--<select name="Hospital" id="Hospital" >
            <option value="All" onmouseup="updateLabel('All')">
                All
                </option>
              <option value="BWH" onmouseup="updateLabel('Butterworth Hospital')">
               Butterworth Hospital
              </option>
              <option value="BH" onmouseup="updateLabel('Blodgett Hospital')">
                Blodgett Hospital
              </option>
              <option value="SC" onmouseup="updateLabel('South Campus')">
                South Campus
              </option>
              <option value="44St60St" onmouseup="updateLabel('44th Stree & 60th Street')">
                44th Stree & 60th Street
              </option>
              <option value="Cafe44" onmouseup="updateLabel('Cafe 44 - Business Service Center')">
               Cafe 44 - Business Service Center
              </option>
              <option value="Coffe Shop" onmouseup="updateLabel('Coffee Shop (Blodgett Campus)')">
                Coffee Shop (Blodgett Campus)
              </option>
              <option value="LHCP" onmouseup="updateLabel('Lemmen-Holton Cancer Pavilion ')">
               Lemmen-Holton Cancer Pavilion 
              </option>
                <option value="Fuller" onmouseup="updateLabel('Fuller Avenue Campus')">
                Fuller Avenue Campus  
              </option>
                <option value="HDCH" onmouseup="updateLabel('Helen DeVos Childrens Hospital ')">
                Helen DeVos Children's Hospital   
              </option>
                 <option value=m.Building_ID>
                <script type="text/javascript">
                document.write(foreach (MenuSystem.Models.Building m in (IEnumerable)ViewData.Model) { m.Building_Name;});
                </script>
                 </option>
         </select>--%>

    <asp:DropDownList ID="DropDownList1" runat="server"
    DataSourceID="TestMenusDBSource"
    DataTextField="Building_Name"
    DataValueField="Building_ID"
    AppendDataBoundItems="True">
    <asp:ListItem>
    Select location
    </asp:ListItem>
    </asp:DropDownList>
    <%--<asp:DropDownList ID="DropDownList2" runat="server"
    DataSourceID="TestMenusDBSource"
    DataTextField="Cafe_Name"
    DataValueField="Cafe_ID"
    AppendDataBoundItems="True">
    </asp:DropDownList>--%>

    <asp:SqlDataSource
        ConnectionString="<%$ ConnectionStrings:TestMenusDBConnectionString %>"
        ID="TestMenusDBSource"
        runat="server"
        SelectCommand="SELECT [Building_Name], [Building_ID] FROM [Building]"> </asp:SqlDataSource>

<%--      <select>
          <% foreach (MenuSystem.Models.Building m in (IEnumerable)ViewData.Model)

          { %>
               <option value <%= m.Building_Name %>> 
               </option>
          <% } %>
     </select>--%>



        </div>
      </div>

      </form>
    <div class="demo">
    <br />
        <p>
             Search by Date:
            <input type="text" id="datepicker"></p>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TemplateRightNav" runat="server">
</asp:Content>
